package com.ims.core.bas.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ims.core.bas.mapper.BasStockMapper;
import com.ims.core.bas.domain.BasStock;
import com.ims.core.bas.service.IBasStockService;

/**
 * 仓库Service业务层处理
 *
 * @author IMS
 * @date 2024-03-20
 */
@Service
public class BasStockServiceImpl implements IBasStockService
{
    @Autowired
    private BasStockMapper basStockMapper;

    /**
     * 查询仓库
     *
     * @param stockid 仓库主键
     * @return 仓库
     */
    @Override
    public BasStock selectBasStockByStockid(Long stockid)
    {
        return basStockMapper.selectBasStockByStockid(stockid);
    }

    /**
     * 查询仓库列表
     *
     * @param basStock 仓库
     * @return 仓库
     */
    @Override
    public List<BasStock> selectBasStockList(BasStock basStock)
    {
        return basStockMapper.selectBasStockList(basStock);
    }

    /**
     * 新增仓库
     *
     * @param basStock 仓库
     * @return 结果
     */
    @Override
    public int insertBasStock(BasStock basStock)
    {
        return basStockMapper.insertBasStock(basStock);
    }

    /**
     * 修改仓库
     *
     * @param basStock 仓库
     * @return 结果
     */
    @Override
    public int updateBasStock(BasStock basStock)
    {
        return basStockMapper.updateBasStock(basStock);
    }

    /**
     * 批量删除仓库
     *
     * @param stockids 需要删除的仓库主键
     * @return 结果
     */
    @Override
    public int deleteBasStockByStockids(Long[] stockids)
    {
        return basStockMapper.deleteBasStockByStockids(stockids);
    }

    /**
     * 删除仓库信息
     *
     * @param stockid 仓库主键
     * @return 结果
     */
    @Override
    public int deleteBasStockByStockid(Long stockid)
    {
        return basStockMapper.deleteBasStockByStockid(stockid);
    }
}
